<script>
import {ElMessageBox} from "element-plus";

export default {

  name: "spend-money",
  data(){
    return{
      charge:{
        money:'',
        type:''
      },
      nowmoney:200,
    }
  },
  methods:{
    cz(){
      ElMessageBox.alert(this.charge.type+'充值'+this.charge.money)
    }
  }
}

</script>


<template>
  <el-card class="box-card" >
    <template #header>
      <div class="card-header">
        <span>当前余额为：{{nowmoney}}</span>

      </div>
    </template>
    <div class="text item">
      <el-form :model="charge" >
        <el-form-item>
          <el-input v-model="charge.money" placeholder="请输入充值金额"></el-input>
        </el-form-item>
        <el-col>
         <el-row span="8">
           <el-form-item>
             <el-radio-group v-model="charge.type" class="ml-4">
               <el-radio label="微信">微信</el-radio>
               <el-radio label="支付宝">支付宝</el-radio>
             </el-radio-group>
           </el-form-item>
         </el-row>
          <el-row span="8">
            <el-form-item>
              <el-form-item>
                <el-button @click="cz">充值</el-button>
              </el-form-item>
            </el-form-item>
          </el-row>
        </el-col>


      </el-form>
    </div>
  </el-card>
</template>

<style>
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}

.box-card {
  width: 480px;
}
</style>
